public class TestDemo8 {
    public static void main(String[] args) {
        int[] array = {2, 3, 4, 6};
        boolean flg = false;
        for (int i = 0; i < array.length-1; i++) {
            if(array[i] > array[i+1]){
                flg = true;
            }
        }
        if(flg == false){
            System.out.println("有序");
        }else{
            System.out.println("无序");
        }
    }
}
